package jdklearning.number;



/**
 * @author shenenlu 2021年05月02日 下午19:47:30
 */
public class IntegerLearning {

    public static void BitAndReverse(int i){
        int reverse = Integer.reverse(i);
        int reverseBytes = Integer.reverseBytes(i);

        System.out.println("input: " + i);
        System.out.println("toBinaryString: \n"+ Integer.toBinaryString(i));
        System.out.println("reverse: \n"+ reverse);
        System.out.println("reverse toBinaryString: \n" + Integer.toBinaryString(reverse));
        System.out.println("reverseBytes: \n"+ reverseBytes);
        System.out.println("reverseBytes toBinaryString: \n"+ Integer.toBinaryString(reverseBytes));


    }



    public static void main(String[] args) {

//        BitAndReverse(-255);
//        BitAndReverse(13);

        System.out.println(Integer.toHexString(13));

    }

}
